<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
		*{
		    margin: 0;
		    padding: 0;
		    list-style: none;
		    border:none
		}	
		img{
		    vertical-align: top;
		    width: 100%;
		}
		section{
		    width: 70%;
		    margin: 0 auto;
		}
		
		.nav{
		    position: fixed;
		    left: 0;
		    top:0;
		    width: 100%;
		}
		</style>
	</head>
	<body>
		<header id="head">
		    <img src="../img/top.png" alt="">
		</header>
		<nav id="nav">
		    <img src="../img/nav.png" alt="">
		</nav>
		<section>
		    <img src="../img/body01.png" alt="">
		    <img src="../img/body02.png" alt="">
		</section>
	</body>
	<script src="通用兼容文件.js"></script>
	<script>
		window.onload = function(){
			var navtop =$('nav').offsetTop;
			
			window.onscroll = function(){
				var scrolltop = scroll().top;
				
			if(scrolltop >= navtop){
				$('nav').className = 'nav';		
			} else{
				$('nav').className = '';
			}
			}
		}
	</script>
</html>
